<template>  
    <!-- <iframe :src="videoUrl"  style="width: 100%;" :style="{height:height+'rpx'}"></iframe>  -->
	  <iframe  name="toppage"  width=100% marginwidth=0 marginheight=0 frameborder="no" border="0"  :src="videoUrl" :style="{height:height+'rpx'}"></iframe>
</template>
<script>
    export default {  
		props:{
			height:'',
			videoUrl:'',
			img:'',
		},
        data() {  
            return {  
				onloadCode:'', 
                // onloadCode:`
                // const url = 'https://cos.ap-shanghai.myqcloud.com/50a8-shanghai-007-sharedv4-01-1303031839/7faf-1400767345/0b86-USER_8/eb12e96ec1d1b3a5f69b8a60d19df62e-compress_video_324486590.mp4'
                // this.contentWindow.document.body.innerHTML = '<video style="width: 100%;height: 100%" controls="controls" src="'+url+'" ></video>';  
                // const iframe = top.document.getElementsByTagName('iframe')[0]   
                // var evObj = document.createEvent('MouseEvents');   
                // evObj.initEvent( 'event1', true, false );    
                // iframe.dispatchEvent(evObj)  
                // `,
            }
        },  
		// mounted() {      
		// 	console.log(this.videoUrl,this.height)
		//   	this.onloadCode= `
  //               const url = ${this.videoUrl} 
  //               this.contentWindow.document.body.innerHTML = '<video style="width: 100%;height: 100%" controls="controls" src="'+url+'" ></video>';  
  //               const iframe = top.document.getElementsByTagName('iframe')[0]    
  //               var evObj = document.createEvent('MouseEvents');  
  //               evObj.initEvent( 'event1', true, false );   
  //               iframe.dispatchEvent(evObj)  
  //               `
		// 		console.log(this.onloadCode)
		// }
        methods: {  
            event1(a) {    
                console.log(a)  
            },  
            event2(a) {  
                console.log(a)  
            }  
        }  
    }  
</script>  

<style>  
</style> 